import Layout from '@/layout/index.vue'
import QuestionListDiyPage from '@/views/page/question_list.vue'
import QuestionCategoryDiyPage from '@/views/page/question_category.vue'
import TestListDiyPage from '@/views/page/test_list.vue'
import TestCategoryDiyPage from '@/views/page/test_category.vue'
import MyDiyPage from '@/views/page/my.vue'
import HomeDiyPage from '@/views/page/home.vue'

export default {
  path: '/page',
  component: Layout,
  name: 'page',
  meta: { weight: 9, title: '页面设置', open: true },
  children: [
    {
      path: '/page/home',
      name: 'page-home',
      component: HomeDiyPage,
      meta: {
        title: '首页配置',
        addtab: true,
        keepalive: 'HomeDiyPage'
      }
    },
    {
      path: '/page/my',
      name: 'page-my',
      component: MyDiyPage,
      meta: {
        title: '我的页面',
        addtab: true,
        keepalive: 'MyDiyPage'
      }
    },
    {
      path: '/page/question-list',
      name: 'page-question-list',
      component: QuestionListDiyPage,
      meta: {
        title: '问答页面',
        addtab: true,
        keepalive: 'QuestionListDiyPage'
      }
    },
    {
      path: '/page/question-category',
      name: 'page-question-category',
      component: QuestionCategoryDiyPage,
      meta: {
        title: '问答分类',
        addtab: true,
        keepalive: 'QuestionCategoryDiyPage'
      }
    },
    {
      path: '/page/test-list',
      name: 'page-test-list',
      component: TestListDiyPage,
      meta: {
        title: '测验页面',
        addtab: true,
        keepalive: 'TestListDiyPage'
      }
    },
    {
      path: '/page/test-category',
      name: 'page-test-category',
      component: TestCategoryDiyPage,
      meta: {
        title: '测验分类',
        addtab: true,
        keepalive: 'TestCategoryDiyPage'
      }
    },
    {
      path: '/page/custom',
      name: 'page-custom',
      component: () => import('@/views/page/custom.vue'),
      meta: {
        title: '自定义页面',
        addtab: true,
        keepalive: 'CustomPageList'
      }
    }
  ]
}
